/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			cst_actmdl.h
  \date			June 2011
  \author		TNick

  \brief		Contains the definition for CstTlbMdl class


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n
 Please read ReadMe.txt and Licence.txt in root folder @n
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @n

*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __CST_ACTMDL_INC__
#define __CST_ACTMDL_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	<QList>
#include	<QAbstractItemModel>

#include	<base/CC_App.h>

#include	"cst_tlb.h"
#include	<gui/cust/CustMdl.h>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */

/// class
/**
*
*/
class CstTlbMdl : public CustMdl		{

	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:


	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */

public:

	/// constructor;
	CstTlbMdl				(
		QObject*		parent = NULL,	/**< the owner */
		bool			b_copy = true	/**< tell if the constructor will
	  use the existing tree from CC_App (which will make this model read-only)
	  or will leave it empty (but modifiable) */
		)
		: CustMdl(parent,CC_App::toolbarsHeader(),b_copy)
	{}

	/// destructor;
	virtual				~CstTlbMdl		(void) {}


private:
	virtual CC_L2D*	new_item(void)
	{
		return new CstTlb();
	}


	/* QAbstractItemModel */

	QModelIndex		index				(
		int						row,
		int						column,
		const					QModelIndex & parent = QModelIndex()
		) const
	{
		if (column < 3)
			return CustMdl::index(row, column, parent);
		else
			return QModelIndex();
	}

	virtual int		columnCount				(
		const QModelIndex &		parent = QModelIndex()
		) const
	{ Q_UNUSED(parent); return 1; }

	QVariant		data					(
		const QModelIndex & index,
		int						role = Qt::DisplayRole
		) const;

	QVariant		headerData				(
		int section, Qt::Orientation orientation, int role ) const
	{	Q_UNUSED(section); Q_UNUSED(orientation);

		if (role == Qt::DisplayRole)
			{
				switch (section)
					{
					case 0:
						return tr("Current toolbar set");
					default:
						return QVariant();
					}
			}
		return QVariant();
	}

	bool			setData					(
		const QModelIndex &		index,
		const QVariant &		value,
		int						role = Qt::EditRole
		);

	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//

};	/*	class CstTlbMdl	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __CST_ACTMDL_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */

